package com.cn.algorithm02.class03;

/***
 * @author: hels
 * @description: 异或交换, 装逼用
 **/
public class C01_XOR {
    public static void main(String[] args) {
        int[] arr = {1,2,6};
        int i = 0;
        int j = 1;
        arr[i] = arr[i] ^ arr[j];
        arr[j] = arr[i] ^ arr[j];
        arr[i] = arr[i] ^ arr[j];

        System.out.println(arr[i] + "  " + arr[j]);
    }
}
